<div class="nav">
    <span class="menuButton"><a class="home" href="${resource(dir:'/',file:"index.gsp")}">Home</a></span>
    <% if ( session.user == null ) { %>
      <span class="menuButton"><g:link class="create" controller="user" action="login">Login</g:link></span>
      <span class="menuButton"><g:link class="create" controller="user" action="create">Register</g:link></span>
    <% } else { %>
      <span class="menuButton"><g:link class="create" controller="callDetail" action="list">Call Detail List</g:link></span>
      <span class="menuButton"><g:link class="create" controller="callDetail" action="myList">My Call Detail List</g:link></span>
      <span class="menuButton"><g:link class="create" controller="callDetail" action="create">New CallDetail</g:link></span>

      <span class="menuButton"><g:link class="create" controller="user" action="edit" id="${session.user.id}">Edit Profile</g:link></span>


      <% if ( session.user.role.equals("admin") ) { %>
        <span class="menuButton"><g:link class="create" controller="user" action="list" >Users</g:link></span>
      <% } %>

      <span class="menuButton"><g:link class="create" controller="user" action="logout">Logout</g:link></span>
    <% } %>
</div>
